package Code.StringBuilderClass;

import java.util.Scanner;

//键盘接收一个字符串，程序判断出该字符串是否是对称字符串
public class Test {
    public static void main(String[] args) {

        System.out.println(Judge(Print()));

    }
    //键盘录入
    public static String Print(){
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入一个字符串：");
        String str = scanner.next();
        return str;
    }

    public static boolean Judge(String str){
        StringBuilder sb = new StringBuilder(str);

        if (str.equals(sb.reverse().toString())){
            return true;
        }else {
            return false;
        }
    }
}
